package com.ff.xyh.feign.client.dictionary;

import com.ff.xyh.common.entity.dictionary.Type;
import com.ff.xyh.common.entity.result.ResultMessage;
import com.ff.xyh.common.entity.result.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Auther FF
 * @Date 2023年 05月 25日
 * @Time 01:47
 */

@FeignClient(value = "consumer-dictionary", contextId = "TypeClient")
@RequestMapping("/dictionary")
public interface TypeClient {
    @GetMapping("get-type-all")
    ResultObject getAllType() ;

    @GetMapping("get-type-id")
    ResultObject getTypeById(
            @RequestParam(name = "id") Integer id) ;

    @GetMapping("delete-type-id")
    ResultObject deleteTypeById(
            @RequestParam(name = "id") int id) ;

    @PostMapping("insert-type")
    ResultObject insertType (
            @RequestBody Type type) ;

    @PostMapping("update-type")
    ResultObject updateType(
            @RequestBody Type type) ;

}
